import { defAxios as request } from '@/utils/http'

/**
 * 获取大气指标列表
 * @returns
 */
export const getAirDataType = params => request({
  url: `/airDataType/list`,
  method: 'GET'
})

/**
 * 查询机场大气监测数据
 * @returns
 */
export const getAirtData = id => request({
  url: `/airData/list/${id}`,
  method: 'GET'
})

/**
 * 获取excel地址
 * @returns
 */
export const getGenerateTable = id => request({
  url: `/airData/generateTable/${id}`,
  method: 'GET'
})

/**
 * 导出报告地址
 * @returns
 */
export const exportReport = (data) => {
  return request({
    url: '/airData/export',
    method: 'post',
    data
  })
}
/**
 * 根据机场id获取机场信息天气温湿度及挂载状态
 * @returns
 */
export const getAirportDetail = (id) => {
  return request({
    url: `/airport/getAirportDetail/${id}`,
    method: 'GET'
  })
}
/**
 * 根据任务id获取无人机信息(实时数据)
 * @returns
 */
export const getAirportMsg = (id) => {
  return request({
    url: `/inspection/airportMsg/${id}`,
    method: 'GET'
  })
}
// 根据任务id和无人机id获取机场内外视频和直播视频
export const getTypeVideoType = (inspectionId, droneId) => request({
  url: `/inspection/videoUrl?inspectionId=${inspectionId}&droneId=${droneId}`,
  method: 'GET'
})

// 无人机悬停
export const airportHover = (data) => {
  return request({
    url: '/airport/hover',
    method: 'post',
    data
  })
}
// 无人机返航
export const airportReset = (data) => {
  return request({
    url: '/airport/reversalFlight',
    method: 'post',
    data
  })
}
// 滚动条展示信息
export const getInspectionList = params => request({
  url: '/inspection/getList',
  method: 'GET'
})
